home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume9 / uemacs3.8b / part14 < prev    next >
Encoding:
Internet Message Format  |  1987-03-16  |  51.0 KB

  1. Subject:  v09i046:  MicroEMACS, version 3.8b, Part14/14
  2. Newsgroups: mod.sources
  3. Approved: rs@mirror.TMC.COM
  4.  
  5. Submitted by: ihnp4!itivax!duncan!lawrence (Daniel Lawrence)
  6. Mod.sources: Volume 9, Issue 46
  7. Archive-name: uemacs3.8b/Part14
  8.  
  9. #! /bin/sh
  10. # This is a shell archive.  Remove anything before this line,
  11. # then unpack it by saving it in a file and typing "sh file".
  12. # If this archive is complete, you will see the message:
  13. #        "End of archive 14 (of 14)."
  14. # Contents:  emacs1.mss
  15. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  16. echo shar: Extracting \"emacs1.mss\" \(49811 characters\)
  17. if test -f emacs1.mss ; then 
  18.   echo shar: Will not over-write existing file \"emacs1.mss\"
  19. else
  20. sed "s/^X//" >emacs1.mss <<'END_OF_emacs1.mss'
  21. X@chapter(INTRODUCTON)
  22. X     MicroEMACS, henceforth called EMACS, is a full screen editor (not a
  23. Xword processor) which is available on a variety of computers (both micro
  24. Xand mini/main frame).  As a general characteristic, EMACS is a function
  25. Xdriven program wherein every keystroke is a "function" call; hence,
  26. Xthere is no notion of input versus edit modes.  Thus, for example, the
  27. Xkeystroke 'a' invokes the function "insert-character 'a'".  All visible
  28. XASCII (8-bit) characters are self-inserting while the non-visible
  29. X(control) characters are used as commands. 
  30. XThere is a tutorial file called emacs.tut on the distribution disk. 
  31. XIt might be useful if you read this documentation after going through
  32. Xthe tutorial.  To do this, type @b<emacs emacs.tut> when you get the DOS prompt.
  33. XThis will start emacs, instructing it to read in the file emacs.tut
  34. Xfrom the default disk into a standard buffer and put you into it.  You
  35. Xcan then follow the instructions in it.  @i<In case of trouble, you
  36. Xcan always abort a command with CTRL-G or abort emacs with CTRL-X CTRL-C.>
  37. X
  38. X     The command structure of EMACS is simple: commands are
  39. Xsingle keystroke, double keystroke, or full command-spec. For
  40. Xefficiency, single keystroke commands are the most used, followed
  41. Xby 2-keystroke, and so on.
  42. X    Every command (where it makes sense) in EMACS allows for a numeric
  43. Xargument in pre-fix notation.  Since decimal digits are also
  44. Xself-inserting, arguments are passed to the command (including
  45. Xself-insert commands) through two mechanisms.  First, an arbitrary
  46. Xnumeric argument can be passed by ESC <number> where <number> is a
  47. Xstandard decimal number and ESC is the ESCape character (control-[ or
  48. Xthe ESC on your keyboard).  Thus, the sequence "esc 7 a" results in
  49. Xaaaaaaaa.  Second, numeric arguments of powers of 4 can be passed by
  50. Xprefixing a command with control-U's.  Each control-U increases the
  51. Xpower by 1.  Hence control-U means 4, control-Ucontrol-U means 16,
  52. Xcontrol-Ucontrol-Ucontrol-U means 64 and so on.  Thus,
  53. X"control-Ucontrol-Ua" yields:aaaaaaaaaaaaaaaa.  If an explicit numeric
  54. Xargument is not given, EMACS uses 1.  Note also that negative numeric
  55. Xarguments can also be given and EMACS tries to behave intelligently
  56. Xabout them. 
  57. X     The structure of this document is functional: i.e., each
  58. Xsection is devoted to a set of common activities such as moving
  59. Xaround, deleting, copying etc.
  60. X@chapter(PRELIMINARIES)
  61. X@section(REGION or POINT and MARK)
  62. X
  63. X     A region is a block of text to be acted upon by some EMACS
  64. Xcommands.  It is demarcated by the POINT on one end and the MARK at
  65. Xthe other.  The point is the primary location identifier where most
  66. Xof the action takes place and is always @i(between) two characters. 
  67. XThe point is indicated by the cursor position in that it is just
  68. Xbehind the cursor.  The point is also significant in that it defines
  69. Xone end of the region.  The mark, on the other hand, is invisible,
  70. Xand is used to demarcate the other end of the region( see section
  71. X@ref(regmov) or, to peek ahead, one denotes the mark by escape .). 
  72. X@section(BUFFERS)
  73. X     Buffers are regions of memory which are the primary units internal
  74. Xto EMACS and where EMACS does its work. Thus, a file being edited
  75. Xis located in a buffer. One can have multiple buffers, each with
  76. Xa unique name, each of which can contain a file to be worked
  77. Xupon.  The KILL buffer is a very special buffer that is always around
  78. Xand which holds large pieces of deleted text.  While you cannot
  79. Xdirectly work with the buffer, you use it indirectly in copying/moving
  80. Xtext segments.
  81. X
  82. X@section(MODE)
  83. X     An EMACS mode specifies the general fashion in which EMACS
  84. Xdeals with user input.  For example, how should EMACS deal with long
  85. Xlines (> 79 characters)? The mode is associated with the buffer and
  86. Xnot the file.  Hence, the mode has to be explicitly set (or removed)
  87. Xeach time the file is to be edited.  However, since the mode is
  88. Xassociated with the buffer, a new file read into the buffer will be
  89. Xedited with the previously specified mode.  Also, standard (default)
  90. Xmodes can be set for all buffers when EMACS is first started.  (See
  91. X@ref(modes) for more information of modes.)
  92. X@section(WINDOWS)
  93. X     Windows are the visible portions of buffers. EMACS allows as
  94. Xmany windows on the screen as can fit. Since windows are screen
  95. Xobjects, the relationship of windows to buffers can be
  96. Xmany-to-one. That is, one can have many windows per buffer or a
  97. Xeach window could be into a different buffer.
  98. X@section(SCREEN)
  99. X     The screen is usually the 24 row by 80 column section of the
  100. Xphysical screen that is available to EMACS.  The format is as
  101. Xfollows.  The 24th row (the bottom line) is generally clear.  It is
  102. Xused for EMACS prompts, user responses, and EMACS messages.  The
  103. Xremainder of the screen (23 rows) is left for text display.  For
  104. Xeach window that is open on the screen, the bottom line is used to
  105. Xprovide information to the user.  Starting with the program's name
  106. Xand version number, it contains the buffer mode(s) in parenthesis,
  107. Xthe buffer name and, finally, the file name associated with theref
  108. Xbuffer if there is one so associated. 
  109. X@section(OBJECTS)
  110. X     Objects are the entities upon which commands will operate. The most
  111. Xcommon object is the character. Other objects are: words, lines, sentences,
  112. Xparagraphs, screens, regions, and files.
  113. X@section(NOTATION)
  114. X      Standard visible characters are shown normally.  Control charactes
  115. X(the so-called non-printing characters) are shown prefixed by a @b(^)
  116. Xe.g., control-A as ^A.  NOTE: in 8-bit ASCII there are 32 non-printing
  117. Xcharacters: @center<^@ ^A..^Z ^[ ^\ ^] ^^ ^_>
  118. X
  119. X    Control characters are case independent; i.e., ^A is the same as
  120. X^a.  Further, the escape key which, technically, is ^[ is denoted by
  121. XESC; most keyboards have a special key marked ESC.  In two-keystroke
  122. Xcommands, the intervening blank space shown is for clarity and should
  123. Xnot be typed.  Parameters to be supplied by you are indicated as
  124. X[parameter-type].  Finally, special keys are denoted by <key-name>. 
  125. X@section(GETTING STARTED)
  126. X
  127. X    To start using EMACS, just type @b(EMACS [filename]) (where
  128. X[filename] is the name of the file you wish to edit) from your operating
  129. Xsystem's command prompt.  This will bring up EMACS and read in the file
  130. Xyou wish to edit.  (@i[If you are using EMACS for the first time one
  131. Xyour machine, read @ref<install> to learn how to install EMACS on your
  132. Xmachine]).
  133. X
  134. X@chapter(INSERTING TEXT)
  135. X    All standard "printable" ASCII characters are self-inserting.  This
  136. Xmeans for those of you who have "extended" characters (ASCII 128-255)
  137. Xyou can type these in just as you any other character.  For example, on
  138. Xthe IBM-PC, keeping the <Alt> key pressed down while typing in another
  139. Xkey sequence will give you the "extended" character.  With the following
  140. Xexceptions, all other non-printing characters are commands:
  141. X@begin(description)
  142. X^I (or <TAB>)@/Handle-Tab: inserts the tab character or  spaces
  143. Xto move the currently set tab distance (see @ref(tabset)).  When you first
  144. Xstart EMACS, this character inserts itself and while you "see" spaces,
  145. Xthere is just one character there.  However, if you use the set-tab
  146. Xdistance command (by ESC [number] ^I) then the required tab distance is
  147. Xobtained by inserting the requisite number of spaces and @i(now) the
  148. Xspaces that you see are indeed spaces.
  149. X
  150. X^M (or <RETURN>)@/Insert-Newline.  insert a new-line
  151. Xat point.  Note that this is a    
  152. Xcharacter like any other and can be deleted or inserted at any place.  However
  153. Xit looks different because it acts like the carriage-return line
  154. Xfeed pair.
  155. X
  156. X^J (or <LINEFEED>)@/NewLine-Indent: like above but indent to previous
  157. Xline's indentation
  158. XHence, a ^J actually inserts a new-line and as many spaces as
  159. Xrequired to move under the first character on the previous line.
  160. X
  161. X^O (oh)@/Open-Line: insert an open line at cursor for entering text.
  162. XThis is a
  163. Xvery useful command when you are going to be inserting more than a few
  164. Xcharacters in between existing characters.  By using ^O you will not
  165. Xbe forcing EMACS to shift other text around as you type and things
  166. Xwill both go faster and look cleaner on the screen.  If you are going
  167. Xto insert a lot of new text, use a numeric argument to get a lot of
  168. Xblank lines after point.  You can use ^X ^O to clean up the
  169. Xbuffer after you finish adding your text (see @ref(deblank)).
  170. X
  171. X^Q@/Quote-Next-Character.  If you wish certain control characters (non-printing) to
  172. Xappear in your text, you can do so by "quoting" them with a ^Q. Hence
  173. Xthe sequence:  ^Q [char] will insert the [char] into the text.
  174. X
  175. X^C@/Insert-Space.  This command inserts a space after point. 
  176. XWhile not particularly useful in general (since the space-bar "key" does
  177. Xthe same thing and more easily) it is very useful when you are in "insert
  178. Xmode (see @ref(insertmode)).
  179. X@end(description) 
  180. X@chapter(MOVING AROUND)
  181. X     In this chapter, we cover ways of moving around in a variety
  182. Xof contexts: the screen, region, and file.
  183. X@section(SCREEN)
  184. X     Movement commands work on pieces of text called objects.  Three objects
  185. Xare involved in moving around the screen: character, word and paragraph.
  186. X@subsection(Character Moving)
  187. X@begin(description) 
  188. X^F@/Forward-Charcter.  The point moves forward by one character 
  189. Xhence the cursor also moves since the cursor is just after point.  Again
  190. Xnote that since the new-line character is a character, you can "move"
  191. Xover it just as you would any other character.  On the screen this
  192. Xappears as a jump to the beginning of the next line.
  193. X
  194. X^B@/Backward-Character.  Just like Forward-Character but in the reverse
  195. Xdirection.
  196. X@end(description)@subsection(Line Moving)@begin(description)
  197. X^P@/Previous-Line.  The point moves to the same column in the
  198. Xprevious line if that is possible.  If there is no text for it to move to
  199. Xit moves to the end of the line.  However, it "remembers" the column
  200. Xit was in and moves to it when you return to the starting line.  If
  201. Xthe point is on the top line of the screen, the screen scrolls
  202. Xbackward so that the previous line of the text is centered on the new screen.
  203. X
  204. X^N@/Next-Line.  Like ^P but point moves to the next line.
  205. X
  206. X^E@/End-Of-Line.   The point moves after the last character
  207. Xon the line and stays between it and the <new-line> character.  Hence
  208. Xanother ^F (Forward-Character) would put you past the new-line, i.e.,
  209. Xat the beginning of the next line.
  210. X
  211. X^A@/Start-Of-Line.  The point moves to the
  212. Xbeginning of the line and is between the first character on the line
  213. Xand the new-line character of the previous line.  A ^B (or
  214. XBackward-Character), then, would put you at the end of the previous line.
  215. X
  216. XESC G@/To-Numbered-Line.  The cursor moves to the line
  217. Xspecifed by the numeric argument.  If none is given, EMACS, as usual,
  218. Xwould assume 1 and move you to the top of the buffer.
  219. XUse ESC <number> to denote the target line where
  220. Xthe first line is 1.  Hence, for example, if you wished to go to
  221. Xthe 83 line you would type ESC 83 ESC G.
  222. X@end(description)
  223. X@section(Word Moving)
  224. X@begin(description) 
  225. XESC F@/Forward-Word.  The point is moved from its current location to the
  226. Xbeginning of the next word.
  227. XA word is defined to be contiguous characters separated by spaces or
  228. Xpunctuation marks.  Hence if the point is currently in middle of two words
  229. X(i.e., @i[in front of the space or the punctuation]) it is moved to the
  230. Xbeginning of the next word.
  231. X
  232. XESC B@/Backward-Word.  Like forward word but in the reverse direction.
  233. X@end(description)@section(Paragraph Moving)@begin(description)
  234. XESC N@/Forward-Paragraph.  Move to the beginning of the next paragraph.
  235. X
  236. X    NOTE: A paragraph is defined as a section of text separated
  237. Xfrom other text by 1) blank lines, 2) a line starting with
  238. Xblanks, or 3) a line starting with a tab character (^I).@tag(paradef)
  239. X
  240. XESC N@/Backward-Paragraph.  Like forward-paragraph but in the reverse
  241. Xdirection.
  242. X@end(description)@section(Region Moving)@TAG(regmov)
  243. X@begin(description)
  244. X^X ^X@/Exchange-Point-And-Mark.  There is only one region available at
  245. Xa time. Hence, moving
  246. Xby regions is restricted to moving from one end of the region
  247. Xto the other.  To reiterate, the region is defined by the point
  248. X(behind the cursor) at one end and the mark (set by ESC . or ESC space)
  249. Xat the other. Recall that @i<this> end of the region is where the cursor is.
  250. XHence exchanging point and mark effectively moves you from one end of
  251. Xthe region to the other.
  252. X@end(description)@section<Screen Moving>@begin(description)
  253. X^V or <NEXT>@/Next-Screen.  The screen is scrolled up so that the
  254. Xnext set of lines can be shown in the window.  EMACS retains an
  255. Xoverlap of two lines for continuity -- i.e., you do not get a new
  256. Xscreen starting with the first previously invisible line but rather
  257. Xthe new screen will start with two lines from the bottom of the
  258. Xprevious screen. The point is left at the home position (top left hand corner).
  259. X
  260. XESC V or CTRL Z or <PREV>@/Previous-Screen.  Like above except that the previous
  261. Xset of screen lines is displayed.
  262. X@end(description)
  263. X@section(Window Moving)
  264. X@begin(description)
  265. X
  266. X^X O (oh)@/Next-Window.  Moves point to the
  267. Xthe next window on the screen.  EMACS cycles through windows.  Thus, if you
  268. Xare in the bottom window, you are moved to the top window.
  269. X
  270. X^X P@/Previous-Window.  Like above but in the opposite direction.
  271. X@end(description)
  272. X
  273. XFor addtional information on windows, see @ref(windows).
  274. X@section(Buffer Moving)@begin(description)
  275. X
  276. XESC < or <HOME>@/Top-Of-Buffer.  Moves point to the very beginning of
  277. Xthe buffer.
  278. X
  279. XESC >or <shift-HOME>@/Bottom-Of-Buffer.  Moves point to the very end of the buffer.
  280. X
  281. XESC B@/To-Named-Buffer.  You will be prompted for a buffer name (see
  282. X@ref(buflist) on how to find out about your buffers) and will be
  283. Xswitched to it.  If the buffer does not exits, EMACS will create one
  284. Xand put you into it.
  285. X
  286. X^X X@/Next-Buffer.  You will be put into the next buffer
  287. Xin the buffer list.  Like with windows, EMACS cycles through the
  288. Xbuffer list and hence if you are in the last buffer, you will be put
  289. Xinto the first one.
  290. X@end(description)
  291. X
  292. XFor additional information on buffers, see @ref(buffers).
  293. X
  294. X@section(File Moving)
  295. XA file is a named collection of text and is associated with a buffer
  296. Xin EMACS.  EMACS allows full filenames; hence the full path can be specifed.
  297. XIn all cases of moving between files, you will be prompted for a filename
  298. XType it in and hit <return>.
  299. X@begin(description)
  300. X
  301. X^X ^R@/Read-File.  The file, if found, is read into the
  302. Xcurrent buffer overwriting any text already in it. If the buffer has
  303. Xbeen changed and you have not saved your changes, you will be asked to
  304. Xconfirm the overwrite.  If the file is not found where specified, it
  305. Xis assumed that you wish to create a new file with that name and your
  306. Xcurrent buffer is merely emptied.
  307. X
  308. X^X ^F@/Find-File.  EMACS attempts first to find the
  309. Xspecified file within one of the existing buffers.  If it finds the file
  310. Xit merely switches you to that buffer.  If it does not, it will
  311. Xcreate a new buffer, read the specified file if found into it, and
  312. Xswitch you to the new buffer.  If the file is not found, a new buffer
  313. Xis created and you will be put into it.
  314. X
  315. X^X ^V@/View-File.  Like find-a-file above except that the
  316. XVIEW mode is automatically added to the buffer.  In this mode you are
  317. Xonly allowed to move around the buffer and cannot make any changes.
  318. X@end(description)
  319. X@chapter(DELETING)
  320. XLike moving around, deleting is an action that can work with a variety
  321. Xof objects:  characters, words, lines, paragraphs, regions, windows, and
  322. Xbuffers.  It is worth reiterating that the object is defined relative
  323. Xto the point and not the object as a whole.  Hence, if you are in the
  324. Xmiddle of a word and issue a delete-forward-word command, the text
  325. Xdeleted is actually from the point to the end of the word.
  326. X@section(Character)@begin(description)
  327. XCTRL-D@/Delete-Forward-Character.  Since the point is always just before
  328. Xthe cursor, the character under the cursor is deleted.  When you are
  329. Xat the end of a line, the point is just before the <newline>
  330. Xcharacter and, therefore, a Delete-Forward-Character "eats" up the <newline> --
  331. Xin effect this joins the next line to the current one.
  332. X
  333. XCTRL-H  or <BACKSPACE>@/Delete-Backward-Character.  This deletes the
  334. Xcharacter before point.  At the beginning of a line, it deletes the
  335. Xprevious <newline> character and hence joins the current line to the
  336. Xprevious one.
  337. X@end(description)@section(Word)@begin(description)
  338. XESC D@/Delete-Forward-Word.  Deletes the text from the point to the
  339. X@i<beginning> of the next word.  Hence, any punctuation separating the
  340. Xwords is also deleted.
  341. X
  342. XESC <backspace> or ESC CTRL-H@/Delete-Backward-Word.  Like above but
  343. Xin the reversse direction.
  344. X@end(description)@section(Line)@begin(description)
  345. XCTRL-K@/Delete-To-End-Of-Line (Kill line).  All characters from point to the end
  346. Xof the line are deleted.  @i[The <new-line> character is NOT deleted.]
  347. X
  348. X    To delete a line completely from the buffer you would have to do the
  349. Xfollowing: CTRL-A (Start-Of-Line) CTRL-K (Delete-To-End-Of-Line) CTRL-D
  350. X(Delete-Forward-Character to delete the <newline> character).
  351. X
  352. X@tag(delete)
  353. XAs with all major deletes (i.e., when more than a few characters are deleted
  354. XEMACS places the deleted text in a KILLS buffer.  Hence, the deletion
  355. Xcan be undone by "yanking" the text back at point (using CTRL-Y).
  356. X
  357. XCTRL-X CTRL-O (oh)@/Delete-Blank-Lines.  This command deletes all blank
  358. X@i<lines> around the current line.  If there is only blank line after the
  359. Xcurrent line it is @i<not> deleted.  However, if there are more than 1
  360. Xblank lines after the current line, @i<all> of them are deleted.@tag(deblank)
  361. X@end(description)@section(Region)
  362. XThe region is an arbitrary area of the buffer demarcated by the point 
  363. X(just before the cursor!) and the mark. The mark is invisible and is
  364. Xset using ESC . or ESC <space>.  To see the other end of the region,
  365. Xuse the Exchange-Point-And-Mark (CTRL-X XTRL-X) command.  Since the
  366. Xregion has no direction associated with it, this effectively shows you
  367. Xthe mark and all region commands work correctly.  Furthermore, since
  368. Xthe region is completely arbitrary in size you could demarcate any
  369. Xsized object from a single character all the way to the entire buffer.
  370. X@description<
  371. XCTRL-W@/Delete-Region (kill World!).  Deletes the region (between
  372. Xpoint and mark) and places the killed text in the KILLS buffer to be "yanked"
  373. Xback (with CTRL-Y) at the point.  Hence if you ever accidentally type CTRL-W
  374. Xsimply undo it with an immediate CTRL-Y (strictly speaking this does
  375. Xnot have to be done immediately since the KILLS buffer is overwritten
  376. Xonly with the next big delete).>
  377. X@section<Windows>@description<
  378. XCTRL-X 1 (one)@/Close-All-Other-Windows.  This will close all windows on the
  379. Xscreen except for the one you are in (issued the command from).>
  380. X@section(Buffers)@description<
  381. XCTRL-X K@/Delete-Buffer.  You will be prompted for the name of a buffer
  382. XIf the buffer has been changed, you will be asked to confirm the
  383. Xdeletion since killing the buffer would eliminated your changes.  To
  384. Xfind out which buffers you have, use the CTRL-X CTRL-B command (see
  385. X@tag<buflist>).  As always CTRL-G aborts the pending command -- which
  386. Xmeans @i(before) you hit return after typing in the buffer name.>
  387. X
  388. X@section<Files>
  389. X     Files within EMACS are dealt with by dealing with the
  390. Xassociated buffers. If you really want to deal with the
  391. Xdisk based versions of files, escape to MSDOS, manage your files
  392. Xand return to EMACS (see @ref(msdos) for a discussion on using MSDOS from
  393. Xwithin EMACS).
  394. X
  395. X@chapter(MOVING/COPYING TEXT)
  396. X     Transposing single characters is easy in EMACS.  CTRL-T does it. 
  397. XLarger entities are dealt with via the KILLS buffer (see
  398. X@ref(delete)).  Moving or copying text in EMACS is fundamentally
  399. Xidentical.  The general procedure is as follows:
  400. X@begin(enumerate) 
  401. X
  402. XIf pre-defined areas of text are the desired areas to move or copy use
  403. Xthe appropriate delete command (delete-line,  delete para etc.) to get
  404. Xa copy of the area into the KILLS buffer.  An immediate "yank" (CTRL-Y)
  405. Xresults in an unchanged buffer.
  406. X
  407. XIf arbitrary areas of text are desired, the region is used.
  408. XDemarcate the region to be moved/copied (to repeat:
  409. Xat one end of the region use the set-mark command (with ESC .
  410. Xor ESC <space>) and move the cursor to the other end.  Delete (CTRL-W for
  411. Xmove) or copy (ESC W) the region into the KILLS buffer.
  412. XOnce the desired text is in the KILLS buffer, it can be inserted into
  413. X@i(any) buffer by moving the point into the desired buffer at the desired
  414. Xlocation and "yanking" (CTRL-Y) the text from the KILLS buffer.
  415. X@end(enumerate)@begin(description)
  416. XCTRL-W@/Kill-Region.  Delete text between point and mark and copy it
  417. Xinto the KILLS buffer.
  418. X
  419. XESC W@/Copy-Region.  Copy text between point and mark into the KILLS buffer.
  420. X
  421. XCTRL-Y@/Yank-Text.  Insert a copy of the KILLS buffer into current
  422. Xbuffer at point.  @i<If you accidently typed CTRL-W (the kill region command),
  423. Ximmediately recover by typing in CTRL-Y (the yank text command).>
  424. X@end(description)
  425. X
  426. XSince the KILLS buffer is an independent buffer, you can move text
  427. Xbetween @i<files> by moving text between @i<buffers>.  Further, "yanking"
  428. Xis a read-only operation; hence the text can be inserted as many
  429. Xtimes as desired with repeated yanks.  However,  the KILLS buffer gets
  430. Xoverwritten with each major delete (i.e., deletion of more than a few
  431. Xcharacters at a time).  Consequently you cannot (as yet) accumulate
  432. Xtext in the KILLS buffer with a sequence of kills.  If you need to
  433. Xaccumulate text use a regular buffer (one that you ask for, see @ref(buffers))
  434. Xto hold copies of the deleted (or copied) text.  If you are doing a
  435. Xlot of accumulation, you might want to use a keyboard macro (see
  436. X@ref(kbdmacro)).
  437. X@chapter(SEARCH/REPLACE)
  438. XSearching and replacing occurs from the current cursor
  439. Xposition towards the end of the buffers. 
  440. XWhen either (forward or backward) search type is asked for, you will be
  441. Xprompted for the search string on the prompt line. Type in the string
  442. X(including carraige returns, control characters etc.) and finish
  443. Xby hitting the ESC key which marks the end of the string.
  444. XUnfortunately, this means that ESC itself cannot be part of the
  445. Xstring.  The seach behaviour of EMACS depends upon the setting of the
  446. Xexact mode of the buffer (see @ref(buffers) for details on modes).  If
  447. Xexact mode is on, then the search is done on a case sensitive basis. 
  448. XOtherwise, the case of the target is ignored.  Note that the default
  449. Xfor every buffer is for the exact mode to be off (unless the global
  450. Xmode is set to have exact on for each buffer, see @ref(globalmode). 
  451. XObviously, no such constraint exists for the replacement string since
  452. Xthe replacement is @i<always> exact.
  453. XEMACS remembers the search and replace strings and
  454. Xalways shows you the current stored string when it prompts you for a
  455. Xstring .  This string is used if you respond to the prompt with a null
  456. Xstring (i.e., if you simply hit ESC when prompted).
  457. X
  458. XThere are two ways to replace strings in EMACS: unconditional or query
  459. Xreplace.  In the first, EMACS moves from point to the end of the buffer
  460. Xreplacing @i<every> occurrence of the search string with the
  461. Xreplacement string without pause.  In the second, EMACS pauses at
  462. Xevery search string found and prompts you for an action command which
  463. Xallows you to control exactly which occurrences of the search string
  464. Xwill be replaced.  Because of the lack of control over the regular
  465. Xreplace, it is strongly recommended that you be very sure of your
  466. Xchanges before you use it.  In general, the query replace command
  467. Xshould be used.  Procedurally, replacing strings with other strings
  468. X(including the null string) is done as follows: first you are prompted
  469. Xfor the search string and then for the replacement string.  EMACS then
  470. Xmoves from the current position to the end of the buffer replacing (or
  471. Xquerying) as it goes along.  Note that there is no control over the
  472. Xdirection of the replacement -- EMACS always moves foward.  Hence, to
  473. Xwork on the entire buffer, you need first to move to the top of the
  474. Xbuffer and issue the replace command. 
  475. X@begin(description)
  476. X
  477. XCTRL-S@/Search-Forward.  Search for input string (stored string if
  478. Xinput string is null) from point towards the end of the buffer.  The
  479. Xpoint is moved from the current location to the end of the found string.
  480. X
  481. XCTRL-R@/Search-Backward.  Like forward except in the opposite direction
  482. Xi.e., towards the beginning of the buffer.  Note that there is no
  483. Xdistinction made between forward and backward stored search strings.  Finally
  484. Xif the search string is found, the point is moved to the beginning of
  485. Xthe string.
  486. X
  487. XESC R@/Replace.  Replace @i<ALL> occurrences of the search string with
  488. Xthe null string from point to end-of-buffer.
  489. X
  490. XESC CTRL-R@/Query-Replace.  Like above, but pause at each search
  491. Xstring found and query for action.
  492. XThe response expected from you and their effects are as follows:
  493. X@begin(description)
  494. XY(es) or <space>@/Make this replacement
  495. XN(o)@/Do not make this replacement but continue
  496. X!@/Do the rest of the replacements with no queries
  497. XCTRL-G@/Abort the replacement command.  NOTE:  This does not
  498. Xundo any previous replacement that you had authorized.
  499. X.@/Exactly like CTRL-G except that the cursor returns to
  500. Xthe point at which the replacement command was given.
  501. X?@/Help for query replacement
  502. X@end(description)
  503. X@end(description) 
  504. X
  505. X@chapter(DEALING WITH WINDOWS)
  506. X
  507. X@tag(windows)First of all, note that windows are literally that: they are
  508. Xareas of text in a buffer that you can see on the screen.  On the other hand,
  509. Xby moving between windows and visiting different buffers in each, you
  510. Xcan effectively edit several files at the same time.  When you ask for
  511. Xadditional windows, EMACS splits the @i<current> window into two and
  512. Xleaves you in the window created over the current pointer.  Thus you
  513. Xcan get multiple windows on the screen.  What is less obvious is that
  514. Xyou are always in a window which means that all window commands
  515. Xoperate even when you are in a single window.  Each window is similar
  516. Xin that it has a text area and the mode line.  However the
  517. Xinformation/prompt line is common to all windows (and buffers). 
  518. XFurther the new window will be into the same buffer as the one from
  519. Xwhich the create window command was given.  To move the window to
  520. Xanother buffer, you will have to "visit" the desired buffer from the
  521. Xdesired window.  Since files are associated with buffers, this lets
  522. Xyou simultaneously edit several files.  Which leads us to the final
  523. Xpoint: all commands issued to EMACS are executed on the current buffer
  524. Xin the current window.
  525. X@begin(description)
  526. X
  527. XCTRL-X O(oh)@/To-Next-Window.  The current point is moved into the next
  528. X(i.e., towards the end of the screen) window.  Note that the editor
  529. Xcycles through windows which means that if the command is issued from
  530. Xthe bottommost window you are put into the top window.
  531. X
  532. XCTRL-XP@/To-Previous-Window.  Like above but works on the previous
  533. Xwindow. 
  534. X
  535. XCTRL-X 2@/Open-Window.  The current window is split into two
  536. Xwindows -- @i<IF> there is enough space on the screen (a minimum of 1
  537. Xline of text and 1 mode line per window are required).
  538. X
  539. XCTRL-X 1@/Close-Windows.  This closes @i<all> windows except the one
  540. Xfrom which you issued the command.
  541. XCTRL-X CTRL-N@/Scroll-Current-Window-Down.  This scrolls the current
  542. Xwindow down one line; i.e., the top line of the window dissappears and
  543. Xthe hitherto invisible "next" line becomes visible.  Hence the scroll
  544. Xwindow commands work counter-intuitively in that ordinarily one moves
  545. Xones head with a "real" window or one moves the paper while here one
  546. Xis literally moving the window on to the buffer.
  547. X
  548. XCTRL-X CTRL-P@/Scroll-Current-Window-Up.  Like above except in the
  549. Xopposite direction; i.e., the previously invisible line towards the
  550. Xbeginning of the buffer is made visible and the bottom line
  551. Xdissappears from the window. 
  552. X
  553. XECS ! or ESC CTRL-L@/Center-Cursor.  The window is moved such that the
  554. Xline with the point (with the cursor) is at the center of the window.
  555. XCTRL-X ^ or CTRL-X Z@/Enlarge-Window.  The window with the
  556. Xpointer is enlarged by one line and the nearest window is shrunk by
  557. Xone line.
  558. X
  559. XCTRL-X CTRL-Z@/Shrink-Window.  Like above but the current
  560. Xwindow is shrunk and the nearest window is enlarged.
  561. XCTRL-L@/Refresh-Screen.  The screen is blanked and redrawn.  Useful if
  562. Xthe screen updates are out of sync with your  commands.
  563. X@end(description) 
  564. X
  565. X@comment(chapter9to12)
  566. X@chapter<DEALING WITH BUFFERS>@tag(buffers)
  567. X
  568. X     Buffers are the major internal entities in EMACS and are
  569. Xcharacterized by three things: their names, their modes, and the
  570. Xfile with which they are associated.  Furthermore, each buffer has its
  571. Xown remembered mark and point which makes it easy to "visit" other
  572. Xbuffers and return to the original location  in the "current" buffer.
  573. XDealing with them requires the following commands:
  574. X
  575. X@begin(description)
  576. XESC < or <HOME>@/Top-Of-Buffer.  Moves point to the very beginning of
  577. Xthe buffer.
  578. X
  579. XESC >or <shift-HOME>@/Bottom-Of-Buffer.  Moves point to the very end of the buffer.
  580. X
  581. XESC B@/To-Named-Buffer.  You will be prompted for a buffer name (see
  582. X@ref(buflist) on how to find out about your buffers) and will be
  583. Xswitched to it.  If the buffer does not exits, EMACS will create one
  584. Xand put you into it.
  585. X
  586. XCTRL-X X@/Next-Buffer.  You will be put into the next buffer
  587. Xin the buffer list.  Like with windows, EMACS cycles through the
  588. Xbuffer list and hence if you are in the last buffer, you will be put
  589. Xinto the first one.
  590. XCTRL-X CTRL-B@/List-Buffers.  A new window is created into the "List"
  591. Xbuffer which contains details about all the buffers currently known to EMACS.
  592. XYou are left in the original buffer.  To close the new window issue
  593. Xthe close-windows command (CTRL-X 1).  The "List" buffer contains
  594. Xinformation about the set global modes, the "buffer changed" indicator
  595. X(an asterisk in the 2nd column), the buffer specific modes, the
  596. Xbuffer size, the buffer name, and the associated filename.
  597. XCTRL-X K@/Delete-Buffer.  The specified buffer (as above) is
  598. Xdeleted if found.  Since this is a destructive operation, you will
  599. Xasked for confirmation if the buffer was changed and not saved. 
  600. XAnswer Y(es) or N(o).  As usual, CTRL-G cancels the command.
  601. X@end(description)
  602. X
  603. X@section(Modes) @tag(modes)
  604. X     Modes are associated with buffers and govern the way EMACS reacts
  605. Xto certain commands (to be described below).  Each buffer starts with
  606. Xno modes set and this is indicated on the information line in parentheses
  607. XHowever, you can set "global" modes which means that each new buffer
  608. Xstarts off in the set global modes.  Alternatively, you can add and
  609. Xdelete modes for each buffer separately.
  610. X
  611. XCurrently, EMACS has the following modes: normal, wrap, view,
  612. Xoverwrite, exact, and C.  Note that the default for all buffers is to
  613. Xbe placed with no modes unless global modes are set.
  614. XIn this normal case, long lines are not folded
  615. Xand the line shifts to the left to enable you to view lines longer
  616. Xthan 79 characters.  A dollar sign in the last column indicates a line
  617. Xthat is longer than 79 characters.  Furthermore, any text typed after
  618. Xthe 79th character is inserted exactly as is thus enabling you to
  619. Xenter very long lines into your buffer.  Also no other modes are set
  620. Xand hence you have no wrapping, insert mode, and inexact match. 
  621. X@begin(description)
  622. X
  623. XWrap@/When wrap mode is set, EMACS tries to fold (break) lines at
  624. Xthe currently defined right margin. See @tag(wrap) for more details on
  625. Xwrapping text.
  626. X
  627. XView@/View mode essentially puts
  628. Xyou into a read only buffer to prevent accidental damage to
  629. Xfiles.  Some special files, such as the help file, are automatically
  630. Xput into view mode buffer.@tag(viewmode)
  631. X
  632. XOver@/In over(write) mode, the normal "insert" mode is toggled off
  633. Xwhich means anything you type in that would normally have
  634. Xinserted itself would now overwrite the existing text.  The
  635. XInsert-Space command (currently bound to CTRL-C) is very useful in
  636. Xthis mode since it is self-inserting.@tag(insertmode)
  637. X
  638. XExact@/The exact mode
  639. Xcontrols the manner in which string searches are done:  if exact mode
  640. Xis set, the search is case sensitive;  if it is off, the case of the
  641. Xtarget is ignored.
  642. XC@/This mode is
  643. Xautomatically set if the file extension is .c or .h and does useful
  644. Xthings for you when you are writing programs in C.
  645. X@end(description)
  646. X
  647. X
  648. XThe commands required to deal with modes are as follows:
  649. X@begin(description)
  650. XCTRL-X M@/Add-Mode.  You will be prompted for the mode to add.  Type it
  651. Xin and hit return.  The mode line will change to reflect the addition.
  652. XAs always, CTRL-G gets you out.  NOTE: To set the right margin when in wrap
  653. Xmode, use the set right margin command with the appropriate numerical prefix
  654. Xargument with ESC <number> CTRL-X F.  Thus, for example, to set the right
  655. Xmargin at column 68 you would type:  ESC 68 CTRL-X F.  (See @ref<setmargin>).
  656. X
  657. XCTRL-X CTRL-M@/Delete-Mode.  Like above but to remove a mode for the current
  658. Xbuffer.
  659. XESC M@/Add-Global-Mode.  The specified global mode is marked as to-be-added
  660. Xto any new buffer.  Hence, the modes for existing buffers do not
  661. Xchange.@tag(globalmode)
  662. XESC CTRL-M@/Delete-Global-Mode.  The specified global mode is removed
  663. Xfrom the modes to be added to new buffers.   Once again, existing
  664. Xbuffers and their modes are not effected.
  665. X@end(description)
  666. X
  667. X@chapter(DEALING WITH FILES)
  668. XText files are usually thought of as named collections of text
  669. Xresiding on disk (or some other storage medium).  In EMACS the disk
  670. Xbased versions of files come into play only when reading into or
  671. Xwriting out buffers.  The link between the physical file and the
  672. Xbuffer is through the associated filename.  EMACS permits full filenames;
  673. Xi.e., you can specify: disk:\directories\filename.extension.  If the
  674. Xdisk and directories are not specified, the default disk is used. 
  675. XBecause of the way EMACS deals with files, several points ought to be noted.
  676. XFirst, without explicitly saving the buffer into a files, all your
  677. Xedits would be gone upon leaving EMACS (you are asked to confirm
  678. Xwhenever you are about to lose edits).  Second, EMACS (at least currently)
  679. Xhas no mechanism for "protecting" your diskbased files from
  680. Xoverwriting when it saves files.  When instructed to save a file, it
  681. Xmerrily proceeds to dump the file to disk.  If it didn't previously
  682. Xexist it is now created.  If it did, it is overwritten and the
  683. Xprevious version is lost for ever.  Hence, if you are unsure of your
  684. Xedits or for any other reason wish to keep older versions of files around,
  685. Xthe safe procedure is to read the file into a buffer (with CTRL-X R),
  686. Ximmediately change the associated file name (with CTRL-X N), and then
  687. Xstart your edits.  However, if you do not wish to do any edits but
  688. Xmerely peruse the file, add the view mode (see @ref(viewmode)) to the
  689. Xbuffer or ask for the file to be read in for viewing only (with CTRL-X V).
  690. XThe following are the file related commands in EMACS.
  691. X@begin(description)
  692. XCTRL-X CTRL-S@/SAve-Buffer-Under-Current-Filename.  Saves the contents
  693. Xof the current buffer with the associated filename on the default disk/directory
  694. X(if not specified).  Note that  CTRL-X S also works.
  695. XCTRL-X CTRL-W@/Save-Buffer-Under-New-Name.  You will be prompted for a
  696. Xfile name.  Type it in and hit <return>.   The buffer contents will be
  697. Xsaved under the given name.
  698. XCTRL-X N@/Change-Associated-Filename.  The associated filename is
  699. Xchanged (or associated if not previously specified) as specified.
  700. X
  701. XCTRL-X CTRL-F@/Find-A-File.  You will be prompted for a filename.  If the file has already been read into a buffer,
  702. Xyou will be switch to it.  If not, it will be read into a new buffer and you
  703. Xwill be put into that buffer.
  704. XCTRL-X CTRL-R@/Read-In-A-File.  You will be prompted for a filename.  If the
  705. Xfile has already been read into another buffer,  you will be switched to it.
  706. XIf not,  it will be read into the CURRENT buffer thus overwriting the
  707. Xbuffer contents.  As always, you will be asked for confirmation of the
  708. Xoverwrite if the buffer has been changed since the last save.
  709. XCTRL-X CTRL-V@/View-A-File.  Exactly like the above except that the
  710. Xbuffer will automatically be put into view mode thus not allowing you
  711. Xto make any changes to it. 
  712. X@end(description)
  713. X@chapter(FORMATTING)
  714. X     While, as said before, EMACS is not a word-processor, some
  715. Xformatting facilities are available. In no particular order they
  716. Xare:
  717. X@section(WRAPPING TEXT)
  718. X    Normally, EMACS allows you to type in long lines (longer than
  719. Xthe screen width). However, if you wish it to automatically wrap
  720. Xlines longer than a given width, you can do so by setting the
  721. X@tag(setmargin)
  722. XWRAP mode.
  723. X@begin(description) 
  724. XCTRL-X M [WRAP]@/Add-Wrap-Mode.  Add wrap mode to current buffer. 
  725. XNote that [WRAP] means that you respong with WRAP when prompted.
  726. X
  727. XCTRL-X CTRL-M [WRAP]@/Delete-Wrap-Mode.  Removes wrap mode from
  728. Xcurrent buffer.
  729. X@end(description)
  730. X
  731. XWrap mode does not set the column (margin) at which wrapping is
  732. Xsupposed to occur.  Hence, it is very important that along with
  733. Xadding wrap mode to the buffer, you set the desired margin.  If you don't,
  734. Xthe usual default value of 1 is used and the editor will behave very
  735. Xstrangely since any text beyond the first column will be wrapped.
  736. X
  737. X@begin(description)
  738. XCTRL-X F@/Set-Wrap-Margin.  Sets the wrap margin to the given numeric argument
  739. XIf you do not precede this command with a numeric argument (with ESC <number>),
  740. Xthe right margin is set at column 1 which is the default numeric argument. 
  741. X@end(description)
  742. X
  743. XWhen in wrap mode, you can re-format a paragraph after extensive
  744. Xediting as follows:
  745. X@begin<description>
  746. XESC Q@/Fill-Current-Paragraph.  See @ref(paradef) for a discussion of
  747. Xwhat is considered to be a paragraph in EMACS.
  748. X@end(description) 
  749. X@section(Changing Case)
  750. XChanging the case of the text in EMACS is also easy:
  751. X
  752. X@begin(description) 
  753. XESC U@/Upper-Case-Word.  The text from point to the end of the word is
  754. Xchanged to all uppercase.
  755. X
  756. XESC L@/Lower-Case-Word.  Like above except that text is changed to
  757. Xlower case.
  758. X
  759. XESC C@/Capitalize-Word.  The first word after point is capitalized 
  760. X(that is the first letter only is uppercased).  This means that if you
  761. Xissued the command from within a word, the character after point is
  762. Xcapitalized resulting in some wierd looking text.
  763. XESC CTRL-U@/Upper-Case-Region.  All of the text between point and mark (i.e.
  764. Xin the region) is capitalized.
  765. X
  766. XESC CTRL-L@/Lower-Case-Region.  All of the text in the region (between
  767. Xpoint and mark) is lower-cased.
  768. X@end(description) 
  769. X@section(Miscellaneous)
  770. X@tag(tabset)
  771. XSetting tabs to arbitray widths is possible in EMACS but you must be
  772. Xaware of a subtle difference that it makes to your file and hence to
  773. Xyour editing.  When you start EMACS, the tab width is set to the
  774. Xdefault (usually every 8th column) for the tab character (CTRL-I).  As
  775. Xlong as you stay with the default, every time you insert the tab
  776. Xcharacter, a CTRL-I get inserted.  Hence, you logically have a single
  777. Xcharacter which might appear to be several spaces on the screen (or
  778. Xthe output) depending upon the column location of the tab character. 
  779. XThis means that to remove the spacing you have to delete a @i<single>
  780. Xcharacter -- the tab character.
  781. X
  782. XOn the other hand, the moment you explicitly set the tab interval
  783. X(even if it is to the default value), EMACS handles the tab character
  784. Xby expanding the character into the required number of spaces to move
  785. Xyou to the appropriate column.   In this case, to remove the spacing
  786. Xyou have to delete the appropriate number of spaces inserted by EMACS
  787. Xto get you to the right column.
  788. X
  789. X@begin(description)
  790. XCTRL-I@/Set-Tab-Interval.  The tab interval is set to the given
  791. Xnumeric argument.  As always, the numeric argument preceeds the
  792. Xcommand.  Hence to get tabs every 4 spaces you would type in@*
  793. X@center[    ESC 4 CTRL-I]@*
  794. Xor more generally: ESC [number] CTRL-I.
  795. X@end(description)
  796. X@chapter(GETTING OUT OF THINGS)
  797. X    Any pending commands can be aborted with CTRL-G. All this
  798. Xdoes is cancel the command at its current level. Hence, for
  799. Xexample, part of the way through a query replace, the abort will
  800. Xnot undo the changes you have already allowed but will cancel the
  801. Xremainder.
  802. X   Getting out of EMACS itself is possible in several ways:
  803. X@begin(description) 
  804. X
  805. XCTRL-X CTRL-C.@/Hard-Abort.  This gets you out of EMACS and back to DOS.
  806. XHowever if there are changed buffers which have not been
  807. Xsaved, you  will be queried.
  808. XESC Z@/Quick-Exit.  This gets you out of EMACS but only @i<after> all
  809. Xchanged buffers with legal filenames have been saved under the current
  810. Xassociated filenames. Hence this could be a very dangerous command if
  811. Xthere are changed buffers which will overwrite files you wished left
  812. Xunchanged.  In general avoid this command. 
  813. X@end(description)
  814. X
  815. X***********************************************************
  816. X***                  W A R N I N G                      ***
  817. X***                                                     ***
  818. X*** AGAIN, PLEASE NOTE THAT ALL CHANGED BUFFERS WITH    ***
  819. X*** FILENAMES WILL AUTOMATICALLY BE SAVED WITH ESC Z    ***
  820. X***********************************************************
  821. X
  822. X@comment(ch13 to 16) 
  823. X@chapter(Keyboard Macros)@tag(kbdmacro)
  824. X     A keyboard macro is a short hand way to repeat a series of
  825. Xcommands.  In effect, a "recording" is started, with CTRL-X (,  of the
  826. Xsequence of keys that you hit when defining a keyboard macro.  The
  827. Xrecording is then repeated when you execute the keyboard macro. 
  828. XHence, you could record any combination of character input and
  829. Xcommands you like.  Once you stop recording your keystrokes(with
  830. XCTRL-X ) ), the entire sequence is available to you to be repeated
  831. Xstarting at the point at which the keyboard macro is invoked.  You
  832. Xcould, therefore start recording at some location, move to another
  833. Xpoint, and repeat the entire sequence at that location by invoking the
  834. Xrecorded macro (with CTRL-X E). Since it is keystrokes that are being
  835. Xsaved, you can freely intermix commands and text to be inserted  into
  836. Xthe buffer.  Unfortunately, you cannot save a keyborad macro for
  837. Xlater.  If you start another keyboard macro recording session, the previously
  838. Xdefined macro is lost.  So make sure that you are done with the
  839. Xcurrent keyboard macro before defining another one.  If you have a
  840. Xseries of commands that you would like to "record" for later use, use
  841. Xthe execute-file or execute-buffer commands (see @ref(execbuf) and/or 
  842. X@ref(execfile)).
  843. X@begin(description)
  844. X
  845. XCTRL-X (@/Start-Recording.  @b(All) keystrokes, commands and input are 
  846. Xrecorded till the end-recording command is given.
  847. X
  848. XCTRL-X )@/End-Recording.    Stop recording keystrokes for macro.
  849. XCTRL-X e@/Execute-Macro.  The entire sequence of recorded keystrokes
  850. Xis repeated starting at the current point.  The result is exactly as if you 
  851. Xwe retyping the sequence all over again.  A numeric argument prefixing
  852. Xthe Execute-Macro command repeats the stored keystrokes that many times.
  853. X@end(description) 
  854. X@chapter(Msdos And Emacs)@tag(msdos)
  855. X    There are two commands which will allow you to use MSDOS
  856. Xwhile within EMACS. Procedurally, you will need to make sure that
  857. Xthe "current" directory contains COMMAND.COM before you issue any
  858. Xinternal commands (see the MSDOS manual). Also, external commands
  859. Xor program may be run with some restrictions depending upon the
  860. Xdegree to which the program "takes over" the computer or the amount of
  861. Xmemory you have and the program size.  When you
  862. Xuse either of the commands, EMACS pops you into MSDOS.  The key
  863. Xdifference between the two commands is in how they act after the first
  864. XMSDOS command has finished executing.  If you use the Run-DOS-Command command
  865. Xa <RETURN> will put you back in EMACS exactly as you were before. 
  866. XThe Run-CLI (run the Command Line Interpretor), on the other hand,
  867. Xleaves you at the DOS command level (usually the A> prompt) so that
  868. Xyou can continue issuing other commands; to return to EMACS, you need
  869. Xto type in EXIT to leave the command line interpretor.
  870. XNOTE: since EMACS is callable from the command line, you could easily have
  871. Xseveral EMACS images in memory!  In general, this is a practice to be avoided
  872. X
  873. X@begin(description)
  874. X
  875. XCTRL-X !@/Run-DOS-Command.  Suspends EMACS and, if the file COMMAND.COM is
  876. Xon the default drive,  allows one DOS command to be executed.  After
  877. Xfinishing with that command, a <RETURN> will put you back in EMACS.
  878. X
  879. XCTRL-X C@/Run-CLI.  Like above execpt that multiple commands are
  880. Xpermitted.  To return to EMACS, type in EXIT at the DOS prompt.
  881. X@end(description)
  882. X
  883. XSUGGESTION: If you are going to run a program (or external MSDOS
  884. Xcommand) from within EMACS for the first time, save your changed
  885. Xbuffers (if you so desire) before you start. Once you are sure
  886. Xthat the program will not damage EMACS, you need not take such
  887. Xprecautions. As a favor to the user community, please inform the
  888. XComputing Center of program that do and do not work and we will
  889. Xtry to disseminate the information.
  890. XPROGRAMS AND EXTERNAL COMMANDS TESTED SO FAR: 
  891. XXDIR@*
  892. XPRINT@*
  893. XKERMIT@*
  894. XFINALWORD@*
  895. XALL "INTERNAL" COMMANDS@*
  896. X
  897. X@chapter(Unbound Commands)
  898. XIn this chapter we mention several commands that are not currently
  899. Xbound to any keys.  If you find that you are using some of these
  900. Xconsistently, you might want to bind them yourself either permanently
  901. Xor temporarily (see @ref(customization)).
  902. X
  903. XTo execute an unbound (or for that matter a bound command) use the
  904. Xcommand: Execute-Named-Command which is currently bound to ESC-X.
  905. X@description[
  906. XESC-X@/Execute-Named-Command.  You will be prompted (with a colon) on
  907. Xthe prompt line for the named command to be executed.  Appendix A
  908. Xcontains a list of the named comands that you could execute.  EMACS
  909. Xattempts to complete the command if you hit the <SPACE> bar; i.e., if
  910. Xthe information that you have typed in so far is sufficient to
  911. Xidentify the command uniquely, EMACS finishes typing it in for you and
  912. Xthen waits for the <RETURN> before executing the command.]
  913. X
  914. XUnbound commands are:
  915. X@begin(description)
  916. XHunt-Forward@/Repeat the last forward search command. Thus this is
  917. Xidentical to you typing in CTRL-S (search-forward) and then defaulting
  918. Xthe search string (by simply giving an ESC at the prompt line).
  919. X
  920. XHunt-Backward@/Repeat the last reverse search command. Thus this is
  921. Xidentical to you typing in CTRL-R (search-reverse) and then defaulting
  922. Xthe search string (by simply giving an ESC at the prompt line).
  923. X
  924. XExecute-Buffer@/You will be prompted for a buffer name.  If the buffer
  925. Xexists, EMACS will assume that its contents are commands to be
  926. Xexecuted by it before returning control to you.  If any of the
  927. Xcommands are incorrect in the buffer, EMACS aborts the command and
  928. Xreturns control to you immediately.  The syntax of commands in the
  929. Xbuffer is as follows:@*
  930. X    [numeric argument] named-command [string argument] [string argument]@*
  931. Xwhere the only required parameter is the named-command itself.@tag(execbuf)
  932. X
  933. XExecute-File@/Very similar to the Execute-Buffer command except that
  934. Xyou will be prompted for a file containing commands to be executed by
  935. XEMACS. As in the above case, error will cause an immediate abort and
  936. Xthe syntax of the commands is the same.@tag(execfile)
  937. X
  938. XExecute-Command-Line@/????
  939. X@end(description)
  940. X@chapter(Customization)
  941. X@tag(customization)
  942. XEMACS is extensively customizable in that the keystroke used to invoke
  943. Xa command can be changed to suit your needs at will.  The connection
  944. Xof a keystroke to a command is called key-binding.  Keybinding can be
  945. Xdone temporarily or permanently -- by which we mean that the changed
  946. Xkeybinding will last only during one editing session or will always be
  947. Xeffective.  Furthermore, any keybinding can be removed permanently or during
  948. Xan editing session.  We will cover temporary bindings and unbindings first.  
  949. X
  950. X@begin(description)
  951. XESC K@/Bind-To-Key.  The Bind-To-Key command, currently bound to ESC
  952. XK, will prompt you for the named command and the key to which it is to
  953. Xbe bound.  The set of named commands is in Appendix A.  The key(s) to
  954. Xwhich the command is to be bound are simply typed in exactly.  That
  955. Xis, to bind a command to, say ESC D, type in the named command, a
  956. Xspace, and then the keys ESC and D.
  957. X
  958. XESC CTRL-K@/Unbind-Key.  This command undoes the effect of the
  959. Xprevious command or any built-in bindings.  As above you will be
  960. Xprompted for the required information -- in this case the information
  961. Xis simply the key to be unbound which is to be typed in exactly as
  962. Xabove.
  963. X@end(description)
  964. X@i<@b[
  965. XNOTE:  be very careful in binding and unbinding keys since you could
  966. Xget into some very peculiar situations such as being unable to abort
  967. Xour of a command (if you unbind CTRL-G or bind it to something else)
  968. Xor recover from the bad binding/unbinding if you unbind Execute-Named-Command
  969. Xor the Unbind-Key command.  As long as you leave yourself the
  970. Xopportunity to do either of the last two commands, youc an recover
  971. Xfrom disasterous bindings/unbindings.]>
  972. X
  973. XPermanent changes are done indirectly through the EMACS.RC file.  This
  974. Xis a file that EMACS reads and executes (see @ref(execfile))
  975. X@i<before> startup and hence results in the appearance of a permanent
  976. Xchange in the keybindings.  The syntax of commands in the EMACS.RC
  977. Xfile is described under the Execute-File command (@ref(execfile)).  Of
  978. Xprincipal concern here are the two commands Bind-To-Key and
  979. XUnbind-Key.  The primary difference between the way parameters are
  980. Xpassed to these commands in the EMACS.RC file is that the keys are not
  981. Xtyped in directly (as in the control-I key when you want CTRL-I) but
  982. Xsymbolically using the following symbols:
  983. X
  984. X@description[
  985. X
  986. X^@/for control keys. For example to indicate control-I, you would type ^I.
  987. X
  988. XM@/for the escape key.  For example, to indicate ESC CTRL-K, you would
  989. Xtype in M^I.
  990. X
  991. XFN@/for "function" keys.  The reason for the quotes is that for the
  992. XHP150 the term function is expanded to include all of the special keys
  993. Xsuch as the <INSERT-CHAR> key.  
  994. X]
  995. END_OF_emacs1.mss
  996. if test 49811 -ne `wc -c <emacs1.mss`; then
  997.     echo shar: \"emacs1.mss\" unpacked with wrong size!
  998. fi
  999. # end of overwriting check
  1000. fi
  1001. echo shar: End of archive 14 \(of 14\).
  1002. cp /dev/null ark14isdone
  1003. MISSING=""
  1004. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
  1005.     if test ! -f ark${I}isdone ; then
  1006.     MISSING="${MISSING} ${I}"
  1007.     fi
  1008. done
  1009. if test "${MISSING}" = "" ; then
  1010.     echo You have unpacked all 14 archives.
  1011.     echo "See the readme file"
  1012.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1013. else
  1014.     echo You still need to unpack the following archives:
  1015.     echo "        " ${MISSING}
  1016. fi
  1017. ##  End of shell archive.
  1018. exit 0
  1019.